# 设置CMake的最低版本要求
cmake_minimum_required(VERSION 3.10)

# Set the project name
set(CMAKE_PROJECT_NAME robot)

# 项目名称
project(${CMAKE_PROJECT_NAME})

# 设置C标准
set(CMAKE_C_STANDARD 11)

# Define the build type
if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE "Debug")
endif()


set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")

# 添加可执行文件
# add_executable(可执行文件名 源文件1 源文件2 ...)
add_executable(${CMAKE_PROJECT_NAME} main.c ../../Algorithm/robot.c)

# Add sources to executable
target_sources(${CMAKE_PROJECT_NAME} PRIVATE
    # Add user sources here
)

# Add include paths
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
    # Add user defined include paths
    ../../Algorithm
)

# 如果需要链接库，可以使用target_link_libraries
target_link_libraries(${CMAKE_PROJECT_NAME} m)

# 设置安装路径（可选）
# install(TARGETS my_executable DESTINATION bin)
